package net.huashitong.user.dao;

import org.springframework.stereotype.Repository;

import com.sirdc.modules.core.dao.GenericQuery;
import com.sirdc.modules.core.dao.StringDao;

import net.huashitong.user.entity.DynamicUser;
@Repository
public class DynamicUserDao extends StringDao<DynamicUser> {
	
	public DynamicUser queryByUserIdAndDYnamcId(String userId,String dynamicId){
		GenericQuery query  = createQuery("obj");
		query.append(" and obj.userId= :userId").setParam("userId", userId);
		query.append(" and obj.dynamicId= :dynamicId").setParam("dynamicId", dynamicId);
		return query.firstResult();
	}
    
}
